<?php
$service  = new SoapClient("http://208.74.72.210:8080/EnticeWS/services/billing3?wsdl");

$key = 'pass';
$key = mkResllerKey($key);

//041565409351933
//$data = $service->getSubscriber('12',$key, '04128582369454235');
//acct_id = 283
//cust_id = 4128

//041287165256993

//Hàm này tạo ra một subscriber vào add số điện thoại vào
$cust_id = '4156';
$acct_id = '283';

$xml = '<?xml version="1.0" encoding="UTF-8"?>
   <EnticeRequest>
     <data>
       <row>
        <SUBSCRIBER_ID>041560981722186</SUBSCRIBER_ID>
        <ANI>
                <NUMBER>1111111111</NUMBER>
                <PIN>111</PIN>
        </ANI>
       </row>
     </data>
   </EnticeRequest>';

$data = $service->addANItoSubscriber('12',$key,$xml,'bao');

//header('Content-type: text/xml');
var_dump ($data);

function mkResllerKey($key)
{
	$dt = gmdate("m/d/Y", time());
	$key =substr($dt,0,6).$key.substr($dt, 5);
	return md5($key);
}